package cn.cs.mapper;
import cn.cs.common.Dto;
import cn.cs.pojo.Complaint;
import cn.cs.pojo.CsPerson;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ComplaintMapper {

	public Complaint getComplaintById(@Param(value = "id") String id)throws Exception;

	public List<Complaint> getComplaintByPhone(@Param(value = "userId") String userId)throws Exception;

	public List<Complaint> getComplaintListByMap(Map<String, Object> param)throws Exception;

	public Integer getComplaintCountByMap(Map<String, Object> param)throws Exception;

	public Integer updateComplaint(Complaint complaint)throws Exception;

	public Integer deleteComplaintById(@Param(value = "id") Long id)throws Exception;

	public Integer insertComplaint(Complaint complaint)throws Exception;

	public Dto registerComplaint(@Param(value = "clientUserId") String clientUserId, @Param(value = "title") String title, @Param(value = "content") String content, @Param(value = "createTime") String createTime)throws Exception;

	public CsPerson findPersonByName(@Param(value = "username") String username);

	public Map<String, Object> getAgentByRepairUserId(@Param(value = "id") String id);

	public Map<String, Object> getAgentABByRepairUserId(@Param(value = "id") String id);

	public Map<String, Object> getAgentABByOrderId(@Param(value = "id") String id);

	public Map<String, Object> getAgentABByAppOrderId(@Param(value = "id") String id);

}
